package com.atguigu.lease.web.admin.service.impl;

import com.atguigu.lease.model.entity.ViewAppointment;
import com.atguigu.lease.web.admin.mapper.ViewAppointmentMapper;
import com.atguigu.lease.web.admin.service.ViewAppointmentService;
import com.atguigu.lease.web.admin.vo.appointment.AppointmentQueryVo;
import com.atguigu.lease.web.admin.vo.appointment.AppointmentVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author xiongkunYang
 * @description 针对表【view_appointment(预约看房信息表)】的数据库操作Service实现
 * @createDate 2025-04-19 22:27:34
 */
@Service
public class ViewAppointmentServiceImpl extends ServiceImpl<ViewAppointmentMapper, ViewAppointment>
        implements ViewAppointmentService {
    private final ViewAppointmentMapper viewAppointmentMapper;

    public ViewAppointmentServiceImpl(ViewAppointmentMapper viewAppointmentMapper) {
        this.viewAppointmentMapper = viewAppointmentMapper;
    }

    @Override
    public IPage<AppointmentVo> AppointmentPageByQuery(long current, long size, AppointmentQueryVo queryVo) {
        Page<AppointmentVo> page = new Page<>(current, size);
        return this.viewAppointmentMapper.selectAppointmentPageByQuery(page, queryVo);
    }
}




